﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CluelessGame
{
    [Serializable]
    public abstract class Location
    {
        public string Name = Guid.NewGuid().ToString();
        public List<Character> Occupants = new List<Character>();

        public Location()
        {

        }

        public static bool operator ==(Location a, Location b)
        {
            if ((object)a == null && (object)b == null)
                return true;
            if ((object)a == null || (object)b == null)
                return false;
            return a.Name == b.Name;
        }

        public static bool operator !=(Location a, Location b)
        {
            if ((object)a == null && (object)b == null)
                return false;
            if ((object)a == null || (object)b == null)
                return true;
            return a.Name != b.Name;
        }

        public override bool Equals(object obj)
        {
            return this == obj as Location;
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
